package com.bifang.common.constant.enums.common;
/**
 * excel类型
 *
 * @author chenzh
 * @date 2018-08-12
 */
public enum ExcelTypeEnum {
    xls("xls"),
    xlsx("xlsx");
    private String type;

    ExcelTypeEnum(String type) {
        this.type = type;
    }

    public String getType() {
        return this.type;
    }

    public static ExcelTypeEnum getByType(String type) {

        for (ExcelTypeEnum typeEnum : values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum;
            }
        }
        return null;
    }
}
